<template>
    <div class="adjustcoursedetail">
        <h2 class="navs">调课详情</h2>
        <h2 class="back" @click="back">返回</h2>
        <div class="adjustdetailbox">
            <el-row class="row_1">
                <el-col class="col_1" :span="12">
                    <h3>申请老师:</h3>
                    <p>{{ formData.teaName }}</p>
                </el-col>
                <el-col class="col_1" :span="12">
                    <h3>申请日期:</h3>
                    <p>{{ formData.createTime }}</p>
                </el-col>
            </el-row>
            <el-row class="row_1">
                <el-col class="col_1" :span="12">
                    <h3>所调班级:</h3>
                    <p>{{ formData.clazzName }}</p>
                </el-col>
                <el-col class="col_1" :span="12">
                    <h3>所调课程:</h3>
                    <p>{{ formData.subName }}</p>
                </el-col>
            </el-row>
            <el-row class="row_1">
                <el-col class="col_1" :span="12">
                    <h3>调课时间:</h3>
                    <p>{{ formData.newTime }}</p>
                </el-col>
                <el-col class="col_1" :span="12">
                    <h3>审&nbsp;&nbsp;批&nbsp;&nbsp;人:</h3>
                    <p>{{ formData.userName }}</p>
                </el-col>
            </el-row>
            <el-row class="row_1">
                <el-col class="col_1" :span="12">
                    <h3>原上课时间:</h3>
                    <p>{{ formData.oldTime }}</p>
                </el-col>
            </el-row>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            formData: {
                teachername: "",
                createTime: "",
                clazzName: "",
                newTime: "",
                oldTime: "",
                subName: "",
                userName: "",
            },
            reaId: 0,
            baseUrl: require("../js/baseUrl.js").baseUrl,
        }
    },
    methods: {
        back() {//返回上一级
            this.$router.go(-1)
        },
        //查看调课信息
        lookchangecourse() {
            this.$http.post(this.baseUrl + "SchoolSys/rea/ReaInfoByID", {
                rId: Number(this.reaId),
            }).then(res => {
                //console.log("修改信息", res);
                if (res.data.code == 200) {
                    this.formData = res.data.data
                    let createTime = res.data.data.createTime + ""
                    this.formData.createTime = createTime.substring(0, 10)
                }else{
                    this.$message.error(res.data.msg)
                }
            })
        },
    },
    mounted() {
        this.reaId = this.$route.query.adjustcourseinfoid
        this.lookchangecourse();
    }
}
</script>

<style lang="less">
.adjustcoursedetail {
    padding: 40px;
    position: relative;
    height: 40px;
    line-height: 40px;

    .navs {
        text-decoration: none;
        color: #000;
        font-weight: 900;
    }

    .adjustdetailbox {

        margin-top: 30px;
    }

    .adjustdetailbox h3 {
        width: 100px;
        height: 30px;
        line-height: 10px;
    }

    .adjustdetailbox p {
        width: 320px;
        margin-left: 10px;
        margin-bottom: 19px;
        line-height: 40px;
        border: 1px solid #999;
        background-color: #ffffff;
        padding-left: 10px;
    }

    .adjustdetailbox .row_1 .col_1 {
        display: flex;
        align-items: center;
    }

    .back {
        position: absolute;
        right: 50px;
        top: 30px;
        color: #000;
    }
}
</style>